﻿using System.Xml;
using System.Xml.Serialization;

namespace ABC.XPath.Test.Models
{
	/// <exclude/>
	[XmlRoot("t1")]
	public class TwoTransparent2
	{
		private XmlDocumentFragment _frag;
		private XmlDocumentFragment _frag2;

		public static TwoTransparent2 Create()
		{
			var ttxf = new TwoTransparent2();
			var doc = new XmlDocument();
			ttxf._frag = doc.CreateDocumentFragment();
			ttxf._frag2 = doc.CreateDocumentFragment();
			ttxf._frag2.AppendChild(doc.CreateElement("sub2")).InnerText = "3";
			ttxf._frag2.AppendChild(doc.CreateElement("sub2")).InnerText = "4";
			return ttxf;
		}

		[XmlAnyElement]
		public XmlDocumentFragment Frag
		{
			get { return _frag; }
			set { _frag = value; }
		}

		[XmlAnyElement("sub2")]
		public XmlDocumentFragment Frag2
		{
			get { return _frag2; }
			set { _frag2 = value; }
		}
	}
}
